﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProgNetComponents.Collections;
using ProgNetComponents.Interfaces;

namespace ProgNetComponentsDx.Browsers
{
    public class BrowserConfigRecord : INamedObject
    {
        public BrowserConfigRecord()
        {
            MinRecordsForDialog = 50;
        }

        public BrowserConfigDisplayType DisplayType
        {
            get;
            set;
        }
        public int MinRecordsForDialog
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

    }
    public class BrowserConfigRecordCollection : BaseNamedCollection<BrowserConfigRecord>
    {
        
    }

    public enum BrowserConfigDisplayType
    {
        /// <summary>
        /// Only DisplayMember column is visible
        /// </summary>
        ComboDropDown,
        /// <summary>
        /// DropDown
        /// </summary>
        DropDown,
        /// <summary>
        /// Dialog window is shown
        /// </summary>
        DialogWindow,
        /// <summary>
        /// Depending on number of records DropDown or DialogWindow
        /// </summary>
        Auto
    }
}
